/************************************************************************/
/* Original from PHYSX SDK 2.8.4 Sample Code	                        */
/************************************************************************/

#ifndef COOKING_H
#define COOKING_H

#include <NxCooking.h>

class NxPMap;
class NxTriangleMesh;
class NxUserOutputStream;

class Cooking
{
public:
	static bool hasCookingLibrary(); // check to see if the cooking library is available or not!
	static bool InitCooking(NxUserAllocator* allocator = NULL, NxUserOutputStream* outputStream = NULL);
	static void CloseCooking();
	static bool CookConvexMesh(const NxConvexMeshDesc& desc, NxStream& stream);
	static bool CookClothMesh(const NxClothMeshDesc& desc, NxStream& stream);
	static bool CookTriangleMesh(const NxTriangleMeshDesc& desc, NxStream& stream);
	static bool CookSoftBodyMesh(const NxSoftBodyMeshDesc& desc, NxStream& stream);
	static bool CreatePMap(NxPMap& pmap, const NxTriangleMesh& mesh, NxU32 density, NxUserOutputStream* outputStream = NULL);
	static bool ReleasePMap(NxPMap& pmap);
};

#endif /* COOKING_H */
